package com.sms.shared;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="parsingparameter")
public class ParsingParameter {
	@Id
	@GenericGenerator(name = "generator", strategy = "increment")
    @GeneratedValue(generator = "generator")
	@Column(name = "Id")
	private Long id;
	@Column(name = "name", nullable = false, length = 50)
	private String name;
	@Column(name = "dataType", nullable = false, length = 50)
	private String dataType;
	@Column(name = "minLength")
	private Integer minLength;
	@Column(name = "maxLength")
	private Integer maxLength;
	@Column(name = "dateFormat", length = 50)
	private String dateFormat;
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name = "parsingMethodId", insertable = false, updatable = false)
	private ParsingMethod parsingMethod;
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getDataType() {
		return dataType;
	}
	public void setDataType(String dataType) {
		this.dataType = dataType;
	}
	public Integer getMinLength() {
		return minLength;
	}
	public void setMinLength(Integer minLength) {
		this.minLength = minLength;
	}
	public Integer getMaxLength() {
		return maxLength;
	}
	public void setMaxLength(Integer maxLength) {
		this.maxLength = maxLength;
	}
	public String getDateFormat() {
		return dateFormat;
	}
	public void setDateFormat(String dateFormat) {
		this.dateFormat = dateFormat;
	}
	public ParsingMethod getParsingMethod() {
		return parsingMethod;
	}
	public void setParsingMethod(ParsingMethod parsingMethod) {
		this.parsingMethod = parsingMethod;
	}
	
	
}
